import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        //设计一个学生类有姓名和成绩两个属性，实现对成绩的修改和输出姓名和成绩
        Student student1=new Student("张三",76.5);
        System.out.println("修改前:");
        System.out.println("姓名:"+student1.name+" "+"分数:"+student1.score);
        student1.score=89.2;
        System.out.println("修改后:");
        System.out.println("姓名:"+student1.name+" "+"分数:"+student1.score);
    }
    public static void main2(String[] args) {
        //杨辉三角问题
        Scanner scan=new Scanner(System.in);
        int x=scan.nextInt();
        int y=scan.nextInt();
        int[][] array=new int[x][y];
        for (int i = 0; i <array.length; i++) {
            for (int j = 0; j <=i; j++) {
                if(i==j||j==0){
                    array[i][j] = 1;
                    array[i][0]=1;
                }else {
                    array[i][j]=array[i-1][j-1]+array[i-1][j];
                }
                System.out.print(array[i][j]+"\t");
            }
            System.out.println();
        }
    }
    public static void main1(String[] args) {
        //百鸡问题
        //公鸡5文元一只，母鸡3文元一只，小鸡1文元3只
        int maleChicken=0;
        int femaleChicken=0;
        int childChicken=0;
        for (maleChicken = 0;maleChicken <=(100/5);maleChicken++) {
            for (femaleChicken = 0; femaleChicken <=(100/3) ; femaleChicken++) {
                if((maleChicken*5)+(femaleChicken*3)+((100-maleChicken-femaleChicken)/3)==100
                        &&(100-maleChicken-femaleChicken)%3==0){
                    System.out.println("公鸡有："+maleChicken+"母鸡有："+femaleChicken+"小鸡有："+(100-maleChicken-femaleChicken));
                }
            }
        }
    }
}
